<template>
  <div class="salary-view5">
    <h1>Salary View 5</h1>
    <ul>
      <!-- query方式 传递参数-->
      <li><RouterLink to="/staff?id=1&name=jack&salary=1001">员工1</RouterLink></li>
      <li><RouterLink :to="{
        path: '/staff',
        query: {
          id: 2,
          name: 'lily',
          salary: 1002
        }
      }">员工2</RouterLink></li>
      <li><RouterLink to="/staff2/3/jackSon/1001">员工3</RouterLink></li>
      <li><RouterLink :to="{
        name: 'staff2',
        params: {
          id: 4,
          name: 'hanMeiMei',
          salary: 1004
        }
      }">员工4</RouterLink></li>
    </ul>
    <div>
      <RouterView/>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { RouterLink,RouterView } from 'vue-router';
// 这里可以添加你的 TypeScript 代码
</script>

<style scoped>
.salary-view5 {
  padding: 16px;
}
</style>
